<template>
    <div>
        <div class="crumbs">
            <div class="contentbox">
                <div class="contentsize">{{ titlename }}-租赁合同签订</div>
                <div>
                    <router-link
                        target="_blank"
                        :to="{ path: '/printfilezltqwdsw', query: { id: projectdetail.caseid } }"
                        style="padding-right: 12px"
                        v-if="!wjshowtitle"
                    >
                        <el-button type="primary" size="small">打印</el-button>
                    </router-link>
                    <el-button @click="cacelsubmitForm('ruleForm')">返回</el-button>
                </div>
            </div>
        </div>
        <div class="container">
            <!-- <div class="addtitle">租赁合同签订</div> -->
            <!-- 租赁合同签订表格 -->
            <div style="width: 80%; margin: auto">
                <table class="table-2">
                    <!-- 三行三列的表格 -->
                    <tr>
                        <td colspan="4" style="font-weight: 700; padding: 10px; font-size: 20px">租赁合同签订</td>
                    </tr>
                    <tr style="background-color: #f5fafa">
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">合同类型:</td>
                        <td style="width:500px">
                            {{
                                projectdetail.htlx == '1'
                                    ? '租赁续期'
                                    : projectdetail.htlx == '2'
                                    ? '租赁终止'
                                    : projectdetail.htlx == '3'
                                    ? '租赁补充'
                                    : ''
                            }}
                        </td>
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">合同编号:</td>
                        <td style="width:500px">
                            {{ projectdetail.htbh }}
                        </td>
                    </tr>
                    <template v-for="(adlistitem, index) in projectdetail.buildList">
                        <tr>
                            <td style="text-align: right; width:200px; font-weight: 700; color: #000">房屋地址:</td>
                            <td colspan="3">
                                {{ adlistitem.fwdz }}
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right; width:200px; font-weight: 700; color: #000">档案号:</td>
                            <td style="width:500px">
                                {{ adlistitem.dabh }}
                            </td>
                            <td style="text-align: right; width:200px; font-weight: 700; color: #000">产权单位:</td>
                            <td style="width:500px">
                                {{ adlistitem.cqdw }}
                            </td>
                        </tr>
                        <tr style="background-color: #f5fafa">
                            <td style="text-align: right; width:200px; font-weight: 700; color: #000">建筑面积:</td>
                            <td style="width:500px">
                                {{ adlistitem.jzmj }}
                            </td>
                            <td style="text-align: right; width:200px; font-weight: 700; color: #000">房屋性质:</td>
                            <td style="width:500px">
                                {{ adlistitem.fwyt }}
                            </td>
                        </tr>
                    </template>
                    <tr>
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">出租地址:</td>
                        <td style="width:500px">
                            {{ projectdetail.czdz }}
                        </td>
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">实际出租面积:</td>
                        <td style="width:500px">
                            {{ projectdetail.czmj }}
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">承租人:</td>
                        <td style="width:500px">
                            {{ projectdetail.czr }}
                        </td>
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">租赁用途:</td>
                        <td style="width:500px">
                            {{ projectdetail.zlyt }}
                        </td>
                    </tr>
                    <tr style="background-color: #f5fafa">
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">
                            {{ projectdetail.type == '2' ? '租金单价:' : '月租金:' }}
                        </td>
                        <td style="width:500px" v-if="projectdetail.type == '2'">
                            {{ projectdetail.zjdj ? projectdetail.zjdj + '元/M²·天' : '' }}
                        </td>
                        <td style="width:500px" v-else>
                            {{ projectdetail.zjdj ? projectdetail.zjdj + '元/月' : '' }}
                        </td>
                        <!-- <td style="text-align: right;width:200px;font-weight: 700;color: #000">租赁期限:</td>
                        <td style="width:500px;">
                            {{ projectdetail.zlqx ? projectdetail.zlqx : '0' }}个月
                        </td> -->
                    </tr>
                    <tr>
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">租赁起始时间:</td>
                        <td style="width:500px">
                            {{ projectdetail.zlqssj ? projectdetail.zlqssj.split(' ')[0] : '' }}
                        </td>
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">租赁到期时间:</td>
                        <td style="width:500px">
                            {{ projectdetail.zldqsj ? projectdetail.zldqsj.split(' ')[0] : '' }}
                        </td>
                    </tr>
                    <tr style="background-color: #f5fafa">
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">合同金额:</td>
                        <td style="width:500px">
                            {{ projectdetail.htje }}
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" style="font-weight: 700; padding: 10px; font-size: 20px">----------</td>
                    </tr>
                    <!-- 现有数据 -->
                    <tr v-if="projectdetail.htlx == '1'">
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">承租人:</td>
                        <td style="width:500px">
                            {{ projectdetail.xqczr }}
                        </td>
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">续期租赁用途:</td>
                        <td style="width:500px">
                            {{ projectdetail.xqzlyt }}
                        </td>
                    </tr>
                    <tr style="background-color: #f5fafa" v-if="projectdetail.htlx == '1'">
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">
                            {{ projectdetail.type == '2' ? '续期租金单价:' : '续期月租金:' }}
                        </td>
                        <td style="width:500px" v-if="projectdetail.type == '2'">
                            {{ projectdetail.xqzjdj ? projectdetail.xqzjdj + '元/M²·天' : '' }}
                        </td>
                        <td style="width:500px" v-else>
                            {{ projectdetail.xqzjdj ? projectdetail.xqzjdj + '元/月' : '' }}
                        </td>
                        <!-- <td style="text-align: right;width:200px;font-weight: 700;color: #000">续期租赁期限:</td>
                        <td style="width:500px;">
                            {{ projectdetail.xqzlqx }}个月
                        </td> -->
                    </tr>
                    <tr v-if="projectdetail.htlx == '1'">
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">续期租赁起始时间:</td>
                        <td style="width:500px">
                            {{ projectdetail.xqzlqssj ? projectdetail.xqzlqssj.split(' ')[0] : '' }}
                        </td>
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">续期租赁到期时间:</td>
                        <td style="width:500px">
                            {{ projectdetail.xqzldqsj ? projectdetail.xqzldqsj.split(' ')[0] : '' }}
                        </td>
                    </tr>
                    <tr style="background-color: #f5fafa" v-if="projectdetail.htlx == '2'">
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">终止日期:</td>
                        <td style="width:500px">
                            {{ projectdetail.htzzsj ? projectdetail.htzzsj.split(' ')[0] : '' }}
                        </td>
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">终止原因:</td>
                        <td style="width:500px">
                            {{ projectdetail.htzzyy }}
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000" v-if="projectdetail.htlx == '1'">
                            续期合同金额:
                        </td>
                        <td v-if="projectdetail.htlx == '1'" style="width:500px">
                            {{ projectdetail.xqhtje }}
                        </td>
                        <td style="text-align: right; width:200px; font-weight: 700; color: #000">经办人签字:</td>
                        <td :colspan="projectdetail.htlx == '1' ? '1' : '3'" style="width:500px">
                            {{ projectdetail.jbrqz }}
                        </td>
                    </tr>
                    <!-- <tr style="background-color: #F5FAFA;">
                        <td style="text-align: right;font-weight: 700;color: #000;">是否转办件:</td>
                        <td>
                            {{ projectdetail.sfzbj }}
                        </td>
                    </tr> -->
                    <tr>
                        <td style="text-align: right; font-weight: 700; color: #000">中心党委会纪要编号:</td>
                        <td colspan="3">
                            {{ projectdetail.jybh }}
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right; font-weight: 700; color: #000">办件事由:</td>
                        <td colspan="3">
                            {{ projectdetail.bjsy }}
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            <el-table :data="filetable" style="width: 100%" border max-height="150">
                                <el-table-column prop="yjbz" label="文件名称" align="center" :show-overflow-tooltip="true">
                                </el-table-column>
                                <el-table-column prop="yjlx" label="文件类型" align="center"> </el-table-column>
                                <el-table-column
                                    prop="wjmc"
                                    label="文件预览"
                                    align="center"
                                    :show-overflow-tooltip="true"
                                    v-if="wjshowtitle"
                                >
                                    <template slot-scope="scope">
                                        <div v-if="scope.row.fj">
                                            <router-link
                                            target="_blank"
                                            :to="{ path: '/perviewfile', query: { id: scope.row.fj[0].id, type: scope.row.fj[0].suffix } }"
                                            style="color: #008a94"
                                            v-if="
                                                scope.row.fj[0].suffix == '.docx' ||
                                                scope.row.fj[0].suffix == '.doc' ||
                                                scope.row.fj[0].suffix == '.xls' ||
                                                scope.row.fj[0].suffix == '.xlsx'
                                            "
                                            >{{ scope.row.wjmc }}<i class="el-icon-document el-icon--right"></i>
                                            </router-link>
                                            <el-button
                                                type="text"
                                                size="small"
                                                @click="redownload(scope.row.fj[0].id, scope.row.fj[0].name, scope.row.fj[0].suffix)"
                                                v-else
                                                >{{ scope.row.wjmc }}<i class="el-icon-document el-icon--right"></i
                                            ></el-button>
                                        </div>
                                        <span v-else>{{ scope.row.wjmc }}</span>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                    prop="wjmc"
                                    label="文件下载"
                                    align="center"
                                    :show-overflow-tooltip="true"
                                    v-if="wjshowtitle"
                                >
                                    <template slot-scope="scope">
                                        <el-button
                                            type="text"
                                            size="small"
                                            @click="downloadfile(scope.row.fj[0].id, scope.row.fj[0].name, scope.row.fj[0].suffix)"
                                            style="color: blue; text-decoration: underline" v-if="scope.row.fj"
                                            >{{ scope.row.wjmc }}</el-button
                                        >
                                        <span v-else>{{ scope.row.wjmc }}</span>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="sfgz" label="是否需要盖章" align="center"></el-table-column>
                                <el-table-column prop="gzlx" label="盖章类型" align="center"></el-table-column>
                            </el-table>
                        </td>
                    </tr>
                    <!-- <tr style="background-color: #F5FAFA;">
                    <td colspan="4">
                        <el-button size="mini" type="primary" @click="cacelsubmitForm('ruleForm')">保存</el-button>
                        <el-button size="mini" type="danger" @click="cacelsubmitForm('ruleForm')">删除</el-button>
                        <el-button size="mini" @click="cacelsubmitForm('ruleForm')">返回</el-button>
                    </td>
                </tr> -->
                </table>
            </div>
            <el-table :data="tableData" style="width: 80%; margin: 30px auto 0" border>
                <el-table-column prop="sssw" label="所属事务名称" align="center"> </el-table-column>
                <el-table-column prop="gwname" label="岗位" align="center"> </el-table-column>
                <el-table-column prop="zjrname" label="转件人" align="center"> </el-table-column>
                <el-table-column prop="zjrq" label="转件日期" align="center">
                    <template slot-scope="scope">
                        {{ scope.row.zjrq ? scope.row.zjrq.split(' ')[0] : '' }}
                    </template>
                </el-table-column>
                <el-table-column prop="bz" label="步骤" align="center"> </el-table-column>
                <el-table-column prop="cz" label="操作" align="center"> </el-table-column>
                <el-table-column prop="clyj" label="处理意见" align="center"> </el-table-column>
                <el-table-column prop="zd" label="转到" align="center"> </el-table-column>
            </el-table>
        </div>
        <el-dialog title="文件" :visible.sync="yjshow" :modal-append-to-body="false" width="80%">
            <el-form ref="yjform" :model="yjform" label-width="auto" :inline="true">
                <el-form-item label="文件类型:" prop="yjlx">
                    <el-cascader
                        :options="yjlxlist"
                        :show-all-levels="false"
                        v-model="yjlx"
                        placeholder="请选择文件类型"
                        :props="{ checkStrictly: true }"
                    ></el-cascader>
                    <!-- <el-select v-model="yjform.yjlx" placeholder="请选择文件类型" style="width: 100%;">
                        <el-option v-for="item in yjlxlist" :key="item.code" :label="item.name" :value="item.code">
                        </el-option>
                    </el-select> -->
                </el-form-item>
                <el-form-item label="文件名称:" prop="yjbz">
                    <el-input placeholder="请输入文件名称" v-model="yjform.yjbz" style="width: 100%"></el-input>
                </el-form-item>
                <el-upload
                    class="upload-demo"
                    :action="httpUrl + '/file/uploadFile'"
                    :on-remove="handleRemoves"
                    :before-remove="beforeRemoves"
                    multiple
                    :on-success="handelfilesuccess"
                    :headers="myHeaders"
                    :file-list="filefileList"
                >
                    <div class="unloadTitle">附件</div>
                    <el-button size="small" icon="el-icon-upload2">上传文件</el-button>
                </el-upload>
            </el-form>
            <div style="width: 220px; margin: auto">
                <el-button type="primary" @click="submitForm" v-if="fileLists.length != 0">上传</el-button>
                <el-button @click="yjshow = false">关闭</el-button>
            </div>
            <el-table :data="yjtableData" style="width: 100%; margin: 30px auto 0" border>
                <el-table-column prop="yjlx" label="文件类别" align="center"></el-table-column>
                <el-table-column prop="wjmc" label="文件" align="center"> </el-table-column>
                <el-table-column prop="yjbz" label="文件名称" align="center"> </el-table-column>
                <el-table-column label="操作" width="100" align="center">
                    <template slot-scope="scope">
                        <el-button type="text" size="small" @click.native.prevent="deleteRow(scope.$index, yjtableData)" style="color: red"
                            >删除</el-button
                        >
                    </template>
                </el-table-column>
            </el-table>
        </el-dialog>
    </div>
</template>
<script>
import { casedetails, bacasedetails, download, caselist, lccheck, buildlist, getbuilddetailbydabh, dbnum, redownload } from '@/api/index';
import fileType from '../vo/filetype';
import valueList from '@/components/common/valueList.vue';
import global from '@/components/common/httpurl.vue';
export default {
    name: 'zxgzend',
    data() {
        return {
            activeName: 'first',
            yjlx: [],
            options: [], //测试
            yjlxlist: valueList.yjlxlist, //是否列表
            yjdeepcolor: null,
            yjshow: false, //文件弹框
            yjform: {}, //文件表单
            jgxslist: valueList.jgxslist,
            qslist: valueList.qslist,
            fwytlist: valueList.fwytlist,
            cblist: valueList.cblist,
            cqdwlist: valueList.cqdwlist,
            sflist: valueList.sflist, //是否列表
            myHeaders: {
                token: localStorage.getItem('token')
            },
            filefileList: [],
            httpUrl: global.httpUrl, //公共地址
            form: {
                clyj: '', //处理意见
                id: '',
                nextnodeid: '', //选择下一步节点id
                selectuser: '', //下一步选择用户id
                zt: 1 //通过驳回 0：驳回 1：通过
            },
            detailform: {}, //获取详情数据
            projectdetail: {},
            fileList: [],
            fileType: fileType,
            tableData: [],
            yjtableData: [],
            filetable: [], //文件列表
            total: 0,
            current: 1,
            pageSize: 10,
            xcnr: [],
            yjlist: [
                '同意',
                '不同意',
                '同意，请认真办理！',
                '不同意，请认真复核！',
                '拟同意，请领导批示！',
                '请办公室盖章！',
                '已盖章',
                '已办理，请归档！'
            ],
            fileLists: [], //文件列表
            czlist: [], //操作列表
            sflists: [
                { name: '是', value: '1' },
                { name: '否', value: '0' }
            ], //是否
            userlist: [], //部门列表
            userlistht: [], //部门列表
            hqshow: false, //会签按钮显示隐藏,
            fileform: {
                caseid: '',
                pageSize: 100,
                current: 1
            },
            lzform: {
                cb: '',
                cqdw: '',
                create_name: '',
                create_name_id: '',
                create_time: '',
                current: 0,
                dabh: '',
                dscs: '',
                dxcs: '',
                fmjz: '',
                fwdz: '',
                fwjg: '',
                fwyt: '',
                fzrq: '',
                id: '',
                jdrq: '',
                jzmj: '',
                jzmja: '',
                jzmjb: '',
                jznd: '',
                jzxs: '',
                note: '',
                pageSize: 999,
                qs: '',
                qzlx: '',
                status_code: 0,
                tdsyqlx: '',
                tdsyqmj: '',
                update_name: '',
                update_name_id: '',
                update_time: '',
                yz: '',
                zlc: '',
                zsbh: '',
                zsxyl: '',
                gfdw: this.$store.getters.gfdw,
                fczt: '1'
            },
            lzlist: [], //楼幢列表,
            titlename: '事务办件',
            type: this.$store.getters.type,
            // 我的事物使用
            wjshowtitle: true,
            gdform: {
                id: ''
            }
        };
    },
    methods: {
        // 选中一个的值
        searchChangeitem(val) {
            console.log(val);
        },
        // 单选一个的测试
        searchChange() {
            if (this.options.length > 1) {
                this.options.splice(0, 1);
            }
        },
        // 点击获取人员列表
        getry(val) {
            this.userlist = val.userlist;
        },
        // 点击获取人员列表(回退)
        getryht(val) {
            console.log(val);
            this.userlistht = val.userlist;
        },
        // 换页
        handleCurrentChange(val) {
            this.current = val;
            this.form.current = val;
            this.buildlist(this.form);
            console.log(val);
        },
        // 返回上一页
        backForm() {
            this.$router.go(-1);
        },
        // 楼幢详情
        // ishq (integer, optional): 是否会签开始节点 ,
        // isstartend (integer, optional): 是否首尾节点 0：否 1：首节点 2：结束节点 ,
        // isth (integer, optional): 是否可退回 ,
        casedetails(data) {
            casedetails(data).then((res) => {
                console.log('res', res);
                this.detailform = res.data; //全部数据
                this.projectdetail = res.data.processtableInfo; //已录入数据
                this.tableData = res.data.nodeList;
                this.fileform.caseid = res.data.id;
                this.form.id = res.data.id;
                this.caselist(this.fileform);
            });
        },
        // (备案)详情
        bacasedetails(data) {
            bacasedetails(data).then((res) => {
                console.log('res', res);
                this.detailform = res.data; //全部数据
                this.projectdetail = res.data.processtableInfo; //已录入数据
                this.tableData = res.data.nodeList;
                this.fileform.caseid = res.data.id;
                this.form.id = res.data.id;
                this.caselist(this.fileform);
            });
        },
        // 流程文件列表
        caselist(data) {
            caselist(data).then((res) => {
                this.filetable = res.data;
                console.log('filelist', res);
            });
        },
        // 流程审批
        lccheck(data) {
            lccheck(data).then((res) => {
                if (res.code == 200) {
                    this.$message.success('审批通过');
                    let userid = this.$store.getters.userId;
                    this.dbnum(userid);
                    this.$router.go(-1);
                }
            });
        },
        // 待办数据
        dbnum(data) {
            dbnum(data).then((res) => {
                console.log('待办', res);
                this.$store.commit('handledbnum1', res.data.swnum);
                this.$store.commit('handledbnum2', res.data.gdnum);
                this.$store.commit('handledbnum4', res.data.wtswnum);
            });
        },
        // 下一步操作按钮
        nextstep() {
            var that = this;
            console.log(this.form);
            if (this.detailform.isstartend == 1) {
                this.form.processtableInfo = this.projectdetail;
                this.form.fileList = this.yjtableData;
            }
            // 先判断是否会签（会签不用选人员）
            if (this.detailform.ishq == 0) {
                // 判断是否是最后一个节点（最后一个节点不用选人员）
                if (that.detailform.isstartend == 2) {
                    that.lccheck(that.form);
                } else {
                    if (that.form.selectuser) {
                        that.lccheck(that.form);
                    } else {
                        that.$message.error('请选择人员！！！');
                    }
                }
            } else {
                this.form.nextnodeid = this.options.toString();
                this.lccheck(this.form);
                console.log(this.form);
            }
        },
        // 下一步回退
        nextstepht() {
            this.form.zt = 0;
            if (this.form.selectuser) {
                this.lccheck(this.form);
            } else {
                this.$message.error('请选择人员！！！');
            }
        },
        // 下载文件
        downloadfile(id, name, type) {
            console.log(id);
            let filetype = fileType[type];
            let data = {
                fileid: id
            };
            download(data).then((res) => {
                const link = document.createElement('a');
                let blob = new Blob([res], {
                    type: filetype
                });
                link.style.display = 'none';
                //设置连接
                link.href = URL.createObjectURL(blob);
                link.download = name;
                document.body.appendChild(link);
                //模拟点击事件
                link.click();
                console.log(res);
            });
        },
        // 文件预览
        redownload(id, name, type) {
            let filetype = fileType[type];
            let data = {
                fileid: id
            };
            redownload(data).then((res) => {
                console.log(res);
                let blob = new Blob([res], {
                    type: filetype
                });
                let url = window.URL.createObjectURL(blob);
                window.open(url, '_blank');
            });
        },
        // 文件
        handleRemoves(file, fileList) {
            console.log(fileList);
            this.fileLists = fileLists;
        },
        // 文件删除前
        beforeRemoves(file, fileList) {
            console.log(file);
            console.log(fileList);
            return this.$confirm(`确定移除 ${file.name}？`);
        },
        // 上传成功
        handelfilesuccess(response, file, fileLists) {
            console.log(fileLists);
            this.fileLists = fileLists;
            this.$message.success('导入成功');
        },
        // 获取到每一个意见值
        getYjVal(val, i) {
            this.yjdeepcolor = i;
            console.log(val);
            this.form.clyj = val;
        },
        // 取消
        cacelsubmitForm() {
            this.$router.go(-1);
        },
        // 跳转文件
        gotoyaojian() {
            this.yjshow = true;
        },
        // 删除
        deleteRow(index, rows) {
            this.$confirm('确定删除此条文件吗？')
                .then(() => {
                    rows.splice(index, 1);
                })
                .catch(() => {
                    this.$message.success('删除取消');
                });
        },
        // 上传功能
        submitForm() {
            if (this.yjlx) {
                var lastItem = this.yjlx[this.yjlx.length - 1];
                this.yjform.yjlx = lastItem;
                //this.yjform.yjlx=this.yjform.yjlx.pop();
            } else {
                this.$message.error('请选择文件类型');
                return;
            }
            console.log('yjlx', this.yjform.yjlx);
            console.log('yjbz', this.yjform.yjbz);
            console.log('fileLists', this.fileLists);
            // 类型 suffix
            let yjlb = this.fileLists.map((res) => {
                return {
                    caseid: '', // 流程实例id ,
                    create_name: '', //创建人 ,
                    create_name_id: '', //创建人id ,
                    create_time: '', //创建时间 ,
                    fj: res.response.data.id, //附件
                    id: '', // id ,
                    status_code: '1', // 1正常 2删除 ,
                    update_name: '', // 修改人 ,
                    update_name_id: '', //修改人id ,
                    update_time: '', //修改时间 ,
                    wjmc: res.response.data.filename, //文件名称 ,
                    yjbz: this.yjform.yjbz, //文件名称 ,
                    yjlx: this.yjform.yjlx //文件类型
                };
            });
            console.log('yjlb', yjlb);
            this.yjtableData = this.yjtableData.concat(yjlb);
            this.yjform.yjlx = null;
            this.yjform.yjbz = null;
            this.yjlx = null;
            this.filefileList = [];
            this.fileLists = [];
        },
        // 选项卡
        handleClick(tab, event) {
            console.log(tab, event);
        },
        // 楼幢
        buildlist(data) {
            buildlist(data).then((res) => {
                if (res.code == 200) {
                    this.lzlist = res.data.records;
                } else {
                    this.lzlist = [];
                }
            });
        },
        // 获取楼幢信息
        getbuildval(val) {
            console.log('楼幢详情', val);
            let data = {
                dabh: val
            };
            getbuilddetailbydabh(data).then((res) => {
                console.log(res);
                this.form.processtableInfo.dabh = res.data.dabh;
                this.form.processtableInfo.fwzldw = res.data.fwzldw;
                this.form.processtableInfo.dz = res.data.fwdz;
                this.form.processtableInfo.fwyt = res.data.fwyt;
                this.form.processtableInfo.jzmj = res.data.jzmj;
                this.form.processtableInfo.buildid = res.data.id;
            });
        }
    },
    mounted() {
        this.gdform.id = this.$route.params.id;
        this.buildlist(this.lzform);
        this.wjshowtitle = this.$route.params.val == 'swcxone' ? false : true;
        let data = {
            id: this.$route.params.id
        };
        if (this.$route.params.num == '1') {
            this.casedetails(data);
            this.titlename = '事务办件';
        } else if (this.$route.params.num == '2') {
            this.bacasedetails(data);
            this.titlename = '档案管理';
        }
    }
};
</script>
<style>
.el-upload-list {
    width: 60%;
}

.el-upload--text {
    width: auto;
    height: 80px;
    overflow: hidden;
    border: none;
}
</style>
<style scoped>
/* 选择意见 */
.xzyj {
    width: 48%;
    height: 110px;
    overflow-y: scroll;
    overflow-x: hidden;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    padding: 10px 0;
    box-sizing: border-box;
}

.xzyj .xzyjitem {
    text-align: left;
    cursor: pointer;
    line-height: 24px;
}

table {
    width: 100%;
    margin: auto;
    text-align: center;
}

.table-1 {
    border: 1px solid #c0c0c0;
    border-collapse: collapse;
    /*合并相邻表格的间距*/
}

.table-1 tr,
.table-1 td {
    font-size: 13px;
    border-collapse: collapse;
    border: 1px solid #c0c0c0;
    padding: 10px;
    box-sizing: border-box;
    color: #606266;
}

.table-2 {
    border: 1px solid #c0c0c0;
    border-bottom: none;
    border-collapse: collapse;
    /*合并相邻表格的间距*/
}

.table-2 tr,
.table-2 td {
    font-size: 13px;
    border-collapse: collapse;
    border: 1px solid #c0c0c0;
    border-bottom: none;
    padding: 10px;
    box-sizing: border-box;
    color: #606266;
}

.container {
    overflow: hidden;
}

.crumbs {
    background-color: #fff;
    padding: 20px 20px;
}

.indexTitle {
    margin-bottom: 20px;
}

.contentbox {
    display: flex;
    justify-content: space-between;
}

.contentsize {
    font-size: 18px;
    font-weight: 700;
    line-height: 32px;
    color: #606266;
}

.handle-box {
    overflow: hidden;
}

.addtitle {
    width: 100%;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 20px;
    box-sizing: border-box;
    margin-bottom: 20px;
    font-weight: 700;
}

.buttonCenter {
    width: 12%;
    margin: auto;
}

.unloadTitle {
    text-align: left;
    padding-bottom: 10px;
    box-sizing: border-box;
    color: #606266;
}

/* 搜索按钮 */
.searchcolor {
    background-color: #7090ff;
}

.detailcontent {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.detailcontent .detailitem {
    /* float: left; */
    width: 33%;
    margin-bottom: 30px;
}

.detailcontent .detailitem1 {
    /* float: left; */
    width: 99%;
    margin-bottom: 30px;
    font-weight: 700;
    color: #008a94;
}

.detailcontent .detailitem2 {
    /* float: left; */
    width: 99%;
    margin-bottom: 30px;
}

/* 项目文件 */
.filebox {
    text-align: center;
    margin-right: 10px;
    cursor: pointer;
}

.fileboxitem:hover {
    color: #7090ff;
}

.deleteitem {
    color: red;
}

.deleteitem:hover {
    color: #eeeeee;
}
</style>